AddIn Editor
Expanding the power of DHTML Menu Builder

The use of small components that extend the basic capabilities of the program, in some way or another, is now very common.
On many applications, these kind of modules are known as plugins.

In DHTML Menu Builder, AddIns can be used to change or add functionality to the JavaScript code generated by the program.
Let's say for example that you would like to change the way the menus disappear or hide. This is one of the most frequently asked questions we've received through our online support form. The answer always was, "well... you will have to compile the menus, edit the generated JavaScript file and modify it by hand."

The problem is that every time you recompile the menus, your changes are lost and you'll have to edit the file again.

Now, with the AddIn Editor you can create an AddIn that modifies the required sections of the default JavaScript file and applies it, automatically, to your menus every time you recompile!

See the Project Properties section for information on how to use an AddIn on your project.

Starting the AddIn Editor

To start the AddIn Editor click on Tools->AddIn Editor

You will receive a warning message. Read it, and answer sincerely.

Creating a new AddIn

To create a new AddIn, simply click on File->New...

You will be asked for a name (this name must not contain any special characters, only letters and/or numbers) and a description of what does the AddIn.

If you need to edit the name or description of an AddIn, simply select File->Properties.
Note that if you change the name of an already saved AddIn, and then you save it with this new name, you will be creating a copy of it.

The AddIn Editor interface

Even though the editor is quite powerful, its interface is very simple.

On the top you have a list of all the sections that can be changed. All these sections are the functions used to control the menus at runtime, except for one special section: GLOBAL. The GLOBAL section contains all the declarations of each global variable. 

Each section has a small indicator. Here's what each indicator means:

The selected section has not been modified
The selected section has been modified
The selected section is a custom function and it has not been modified
The selected section is a custom function and it has been modified

Beside the list of sections are two icons, representing each supported browser. The appropriate icon will light up when the selected section is used by that particular browser.

Right below the list of sections is the Parameters field. This field will show you all the parameters, if any, that are used by the selected function. If the selected section is not a function, this field will become disabled.

Below the Parameters field is the code editor window. Here's where you can make your changes to the default code used by DHTML Menu Builder or add code to your custom functions.

At any time, you can compare your code with the default code by selecting Function->View Original.

If you need to reset a section's code to its default, you can restore its original contents by selecting Function->Restore.

IMPORTANT: When making changes to the code DO NOT CHANGE OR REMOVE the commented lines used in the default code. Doing so will damage the scripts.

Finally, below the code editor, at the bottommost part of the editor window is the description pane. Here you will find important information about the selected section and for the functions, it will contain a description of each parameter and the function's version number.

Adding/Removing new functions

If required, you can add new functions to the code. To do so, just click on Function->Add.

A dialog will appear where you can type the name of the function, the browsers that will use (or support) it and a description.

Remember that when selecting a name for the function and the parameters, you should constrain the name to limitations imposed by the JavaScript language.

Only custom functions (functions created by you, the user) can be removed. If you whish to remove your function, simply select Function->Remove.

Opening/Deleting AddIns

To view a list of all the available AddIns installed for DHTML Menu Builder on your system, select File->Open.

To open an AddIn from the list, select it and click on the Open button.

If you whish to delete an AddIn, just select it and click the Delete button.

Sharing AddIns

All the information on the AddIns is stored on a file with the .ext extension. These files are stored in the AddIns folder inside the installation path of DHTML Menu Builder. If you wish to copy some of your AddIns simply copy these .ext files.

If you wish to install new AddIns just double click it and it will automatically be copied to the AddIns folder.